HRW/HRW4U: Adds SERVER-HEADER & SERVER-URL#12840
Open
zwoop wants to merge 2 commits intoapache:masterfrom
Open
HRW/HRW4U: Adds SERVER-HEADER & SERVER-URL#12840zwoop wants to merge 2 commits intoapache:masterfrom
zwoop wants to merge 2 commits intoapache:masterfrom
Conversation
19bd2fa to
1dd3baf
Compare
1dd3baf to
e17f5f6
Compare
Contributor
Author
|
[approve ci ubuntu] |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds server-origin context primitives to the header_rewrite plugin and synchronizes the HRW4U transpiler + tests so rules can explicitly reference the server request headers and server request URL (as distinct from next-hop destination info).
Changes:
header_rewrite: introduceSERVER-HEADERandSERVER-URLconditions and resource gathering for server request headers.hrw4u: remapoutbound.req.*→SERVER-HEADERandoutbound.url.*→SERVER-URL, addnexthop.*mapping, and adjust reverse resolution behavior.- Tests/docs: update HRW4U fixtures, LSP expectations, add a gold test + rule file, and document the new condition tags.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/hrw4u/tests/test_lsp.py | Updates LSP completion expectations for outbound URL availability (SERVER-URL timing). |
| tools/hrw4u/tests/data/hooks/send_request.output.txt | Updates expected output to use SERVER-HEADER instead of context-sensitive HEADER. |
| tools/hrw4u/tests/data/examples/all-nonsense.output.txt | Regenerates example output to reflect SERVER-URL and SERVER-HEADER mappings. |
| tools/hrw4u/tests/data/examples/all-nonsense.input.txt | Updates example comments to reflect server URL semantics. |
| tools/hrw4u/tests/data/examples/all-nonsense.ast.txt | Regenerates AST snapshot to match updated HRW4U semantics. |
| tools/hrw4u/tests/data/conds/query-param.output.txt | Updates query-param condition output to use SERVER-URL:QUERY. |
| tools/hrw4u/tests/data/conds/outbound.output.txt | Updates outbound URL fixtures to use SERVER-URL. |
| tools/hrw4u/tests/data/conds/nexthop.input.txt | Adds HRW4U input covering nexthop.* usage. |
| tools/hrw4u/tests/data/conds/nexthop.output.txt | Adds expected header_rewrite output for next-hop + server-header usage. |
| tools/hrw4u/tests/data/conds/nexthop.ast.txt | Adds AST snapshot for the new nexthop fixture. |
| tools/hrw4u/src/types.py | Adds a suffix group for nexthop fields. |
| tools/hrw4u/src/tables.py | Updates symbol mappings for SERVER-HEADER, SERVER-URL, and nexthop.* plus reverse-resolution tables. |
| tools/hrw4u/src/hrw_symbols.py | Adjusts reverse prefix condition rewriting to normalize multi-part payloads. |
| tools/hrw4u/pyproject.toml | Bumps HRW4U version. |
| tests/gold_tests/pluginTest/header_rewrite/rules/rule_server_conditions.conf | New gold-test rule validating SERVER-HEADER and SERVER-URL. |
| tests/gold_tests/pluginTest/header_rewrite/header_rewrite_bundle.replay.yaml | Adds a new replay session to validate SERVER-* conditions. |
| plugins/header_rewrite/resources.h | Extends Resources with server request header handles. |
| plugins/header_rewrite/resources.cc | Gathers/releases server request header resources. |
| plugins/header_rewrite/factory.cc | Registers SERVER-HEADER and SERVER-URL condition names. |
| plugins/header_rewrite/conditions.h | Extends condition type enums to support server variants. |
| plugins/header_rewrite/conditions.cc | Implements server variants for header and URL evaluation. |
| doc/admin-guide/plugins/header_rewrite.en.rst | Documents SERVER-HEADER and SERVER-URL in header_rewrite docs. |
| doc/admin-guide/configuration/hrw4u.en.rst | Updates HRW4U mapping docs for new server-aware symbols. |
tests/gold_tests/pluginTest/header_rewrite/header_rewrite_bundle.replay.yaml
Outdated
Show resolved
Hide resolved
Contributor
Author
|
I've address CoPilot's review suggestions. |
Contributor
Author
|
[approve ci autest 0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.